<#macro repeat count>
	<#if (count>0)>
		<#list 1..count as x>  
			<#nested>
		</#list>
	</#if>
</#macro>
<div id="sidebar">
	<ul>
		<li>
			<h2>博客公告</h2>
			<p>${blog.getOption('blog_notice')!'欢迎来到我的博客!'}</p>
		</li>
		<li>
			<h2>文章分类</h2>
			<ul>
				<#list blog.getCategories()! as cat>
				<li>
					<@repeat cat.levelNum - 1>&nbsp;&nbsp;</@repeat>
					<a href="${blog.getURL(cat)}" class="comments">${cat.name}</a>
				</li>
				</#list>
			</ul>
		</li>
		<li>
			<h2>最新评论</h2>
			<ul>
				<#list blog.getLatestComments(10)! as c>
				<li>
					<a href="${blog.getURL(c)}" class="comments">${c.content}</a>
				</li>
				</#list>
			</ul>
		</li>
		<li>
			<h2>最新文章</h2>
			<ul>
				<#list blog.getLatestPosts(10)! as p>
				<li>
					<a href="${blog.getURL(p)}" class="comments" title="${p.title}">${p.title}</a>
				</li>
				</#list>
			</ul>
		</li>
	</ul>
</div>
<!-- end #sidebar -->